package org.dtrd.modules.patient.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.dtrd.modules.patient.entity.po.DtrdRlGroupPatient;
import org.springframework.stereotype.Repository;

import java.util.Set;

/**
 * <p>
 * 分组-患者 Mapper 接口
 * </p>
 *
 * @author QR
 * @since 2021-10-03
 */
@Repository
public interface DtrdRlGroupPatientMapper extends BaseMapper<DtrdRlGroupPatient> {

    /**
     *  根据患者id查询分组名称
     * @param patientId
     * @return
     */
    String selectGroupNameByPatientId(@Param("patientId") Integer patientId);

    /**
     * 删除某个分组下的所有记录
     */
    void deleteGroupPatients(@Param("groupId") Integer groupId);

    void deleteRecordByPatientIds(@Param("patientIdList") Set<Integer> patientIds);
}
